Computer Vision for the Web by Foat Akhmadeev

Computer Vision for the Web by Foat Akhmadeev

Author:Foat Akhmadeev [Akhmadeev, Foat]
Language: eng
Format: azw3, epub, pdf
Publisher: Packt Publishing
Published: 2015-10-13T16:00:00+00:00


Descriptors implementation and their matching

Our goal is to find an object from a template on a scene image. We can do that by finding features and descriptors on both images and by matching descriptors from a template to an image.

We start from the tracking.js library and BRIEF descriptors. The first thing that you can do is set the number of location pairs:

tracking.Brief.N = 512

By default, it is 256, but you can choose a higher value. The larger the value the more information you will get and the more memory and computational cost it requires.

Before starting the computation, do not forget to apply the Gaussian blur. Next, we find the FAST corners and compute descriptors on both images. In the following code, we use the suffix Object for a template image and Scene for a scene image:

var cornersObject = tracking.Fast.findCorners(grayObject, colsObject, rowsObject); var cornersScene = tracking.Fast.findCorners(grayScene, colsScene, rowsScene); var descriptorsObject = tracking.Brief.getDescriptors(grayObject, colsObject, cornersObject); var descriptorsScene = tracking.Brief.getDescriptors(grayScene, colsScene, cornersScene);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.